[contents] [next] [bottom] (1 out of 12)

Appendix A - ScriptX Reference

This appendix provides a formal specification of the ScriptX language. It is intended as an entry point and reference for advanced users. It presents an annotated EBNF (Extended Backus-Naur Form) grammar of ScriptX. The complete EBNF grammar is listed separately at the end of the appendix.

The ScriptX grammar is organized into the following sections:

Topic

Discussion

Listing

Tokens and Literals

230

250

Types of Expression

236

251

Expression Syntax

239

252

Assignment and Variable Access

241

253

Flow of Control

243

253

Definition of Classes

244

254

Definition of Objects

246

254

Definition of Functions and Methods

247

255

Modules

248

255

Exception Handling

249

255

ScriptX Language Syntax

In an Extended Backus-Naur Form grammar, each unit of syntax is defined using tokens and other constructs and that are part of the language. For brevity and readability, this grammar does not depict all rules that govern the use of punctuation and white space with operators and other tokens. Some information about precedence of expressions and operators is also unspecified.

Reserved words and tokens, such as operators, that appear directly as shown in the input stream, are set in Courier boldface in lines of syntax, in lightface in body type. Non-terminals, units of syntax that are defined elsewhere in the grammar, are set in Palatino italics. Descriptive comments are used occasionally to indicate non-printing characters. Since ScriptX is not case sensitive, uppercase characters have been omitted.

Courier boldface		reserved words, operators, printing characters
Courier lightface		reserved words, operators, printing characters in body type
Palatino italics		non-terminals, units of syntax

Table A-1 lists the notations that are used in this grammar.

Table A-1: Notations used in the ScriptX EBNF grammar

Notation

Meaning

::=

is defined as

|

or

[ expr ]

expr is optional

[ expr ]*

repeat expr zero or more times

[ expr ]+

repeat expr one or more times


This document is part of the ScriptX Language Guide, one of the volumes of the ScriptX Technical Reference Series. ScriptX is developed by the ScriptX Engineering Team at Apple Computer, successor to the Kaleida Engineering Team at Kaleida Labs, Inc.

Copyright 1996 Apple Computer, Inc. All Rights Reserved.